﻿var registers={
      "8": [
        { addr: 0x1012, name: "电压报警阀值", desc: "230~300", unit: "V", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 0x1013, name: "电流报警阀值", desc: "0~In", unit: "A", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 0x1014, name: "漏电报警阀值", desc: "0~999", unit: "mA", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 0x1015, name: "温度报警阀值", desc: "0~99", unit: "℃", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 0x1016, name: "温度测量路数", desc: "1~4", unit: "", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 0x1017, name: "脱扣使能", desc: "0 disable 1 enable", unit: "", scale: 1, access: 1, groupflag: 1, inputtype: "switch" },
        //{ addr: 0x1018, name: "强制脱扣", desc: "0 disable 1 enable", unit: "", scale: 1, access: 1, groupflag: 1, inputtype: "switch" },
        //{ addr: 0x1019, name: "IP地址", desc: "x.x.x.x", unit: "", scale: 1, access: 3, groupflag: 4, inputtype: "input" },
        //{ addr: 0x101d, name: "端口", desc: "0~65535", unit: "", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        //{ addr: 0x101f, name: "消音", desc: "0 disable 1 enable", unit: " ", scale: 1, access: 1},
        //{ addr: 0x1020, name: "复位", desc: "0 disable 1 enable", unit: "", scale: 1, access: 1 },
        { addr: 0x1021, name: "物联卡号", desc: "", unit: "", scale: 1, access: 2, groupflag: 15, inputtype: "text" },
      ],
      "10": [
        //{ addr: "04000411", name: "当前剩余电流动作值数组", len: 20, format: "数组", scale: 1, access: 2, unit: "", groupflag: 1, groupseq: 0, inputtype: "text" },
        //{ addr: "04000412", name: "额定极限不驱动时间数组", len: 10, format: "数组", scale: 1, access: 2, unit: "", groupflag: 1, groupseq: 0, inputtype: "text" },
        {
          addr: "04001004", name: "剩余电流参数", len: 1, format: "XX", scale: 1, unit: "", groupflag: 1, access: 3, groupseq: 0, inputtype:
          "picker", pickerList: [{
            name: '额定动作值', values: [
              { id: 0, text: '1档',value:50 },
              { id: 1, text: '2档', value:750 },
              { id: 2, text: '3档' ,value:100},
              { id: 3, text: '4档',value:200 },
              { id: 4, text: '5档',value:300 },
              { id: 5, text: '6档', value:500 },
              { id: 6, text: '7档' ,value:800 },
              { id: 7, text: '8档',value:999 },
              { id: 15, text: '连续可调',value:'' }]
          },
          {
            name: '极限不驱动时间', values: [
              { id: 0, text: '1档',value:60 },
              { id: 1, text: '2档' ,value:100},
              { id: 2, text: '3档', value:200},
              { id: 3, text: '连续可调',value:'' }]
          },
          { name: '剩余电流报警时间', values: [{ id: 0, text: '关闭', value: '' }, { id: 1, text: '启用24h', value: '' }, { id: 2, text: '长期启用', value: '' }] }]
        },
        //{ addr: "04000501", name: "状态字", len: 1, format: "XX", scale: 1, unit: "", groupflag: 1, access: 2, groupseq: 0 },
        { addr: "04001101", name: "剩余电流超限报警整定值", len: 2, format: "0-999", scale: 1, access: 3, unit: "mA", groupflag: 1, groupseq: 0, inputtype: "input" },
        //{ addr: "04001104", name: "额定剩余电流动作值", len: 2, format: "XXXX", scale: 1, access: 3, unit: "mA", groupflag: 1, groupseq: 0, inputtype: "input" },
        //{ addr: "04001105", name: "额定极限不驱动时间", len: 2, format: "XXXX", scale: 1, access: 3, unit: "mS", groupflag: 1, groupseq: 0, inputtype: "input" },
        { addr: "04001301", name: "过电压动作整定值", len: 2, format: "252-300", scale: 1, access: 3, unit: "V", groupflag: 1, groupseq: 0, inputtype: "input" },
        { addr: "04001302", name: "欠电压动作整定值", len: 2, format: "120-165", scale: 1, access: 3, unit: "V", groupflag: 1, groupseq: 0, inputtype: "input" },
        { addr: "04001401", name: "额定动作电流整定值", len: 3, format: "In", scale: 1, access: 3, unit: "A", groupflag: 1, groupseq: 0, inputtype: "input" },
        { addr: "04001402", name: "电流超限报警整定值", len: 1, format: "5-9", scale: 1, access: 3, unit: "0.1In", groupflag: 1, groupseq: 0, inputtype: "input" },
        { addr: "04001403", name: "额定动作时间", len: 2, format: "3-999", scale: 1, access: 3, unit: "S", groupflag: 1, groupseq: 0, inputtype: "input" },
        { addr: "04001406", name: "短路瞬时电流倍数", len: 1, format: "4-12倍", scale: 1, access: 3, unit: "", groupflag: 1, groupseq: 0, inputtype: "input" },
        { addr: "04001407", name: "不平衡电流超限报警动作", len: 1, format: "10-99", scale: 1, access: 3, unit: "%", groupflag: 1, groupseq: 0, inputtype: "input" },
        { addr: "04001408", name: "不平衡电流动作整定值时间", len: 1, format: "3-1800", scale: 1, access: 3, unit: "S", groupflag: 1, groupseq: 0, inputtype: "input" },
        //{addr: "06010101", name: "断路器器预约分闸", len: 2, format: "FF000003", scale: 1, unit: "" , 1, 0
        //{addr: "06010201", name: "断路器器预约合闸", len: 0, format: "", scale:0, , 0, 0
        //{addr: "06010102", name: "断路器器取消预约分闸", len: 2, format: "FF000004", scale: 1, , 1, 0
        //{addr: "06010202", name: "断路器器取消预约合闸", len: 0, format: "", scale: 1, , 0, 0
      ],
      "200":[
        { addr: 1009, name: "电压报警阀值", desc: "230~300", unit: "V", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1010, name: "电流报警阀值", desc: "0~In", unit: "A", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1011, name: "漏电报警阀值", desc: "0~999", unit: "mA", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1012, name: "温度报警阀值", desc: "0~99", unit: "℃", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1013, name: "电压变比", desc: "0~999", unit: "倍", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1014, name: "电流变比", desc: "0~999", unit: "倍", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1015, name: "漏电变比", desc: "0~999", unit: "倍", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1016, name: "接入使能", desc: "1~4", unit: "", scale: 1, access: 3, groupflag: 1, inputtype: "bit", bits: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0], bitsdesc: ['T1', 'T2', 'T3', 'T4', 'UA', 'UB', 'UC', 'IA', 'IB', 'IC', 'IZ', 'A相电弧', 'B相电弧', 'C相电弧','禁止声音']},
        { addr: 1017, name: "继电器使能", desc: "0 disable 1 enable", unit: "", scale: 1, access: 3, groupflag: 1, inputtype: "switch" },
        //{ addr: 1018, name: "IP/域名", desc: "最长26个字符", unit: "", scale: 1, access: 2, groupflag: 13, inputtype: "input" },
        //{ addr: 1031, name: "端口", desc: "0~65535", unit: "", scale: 1, access: 2, groupflag: 1, inputtype: "input" },
        //{ addr: 1032, name: "apn", desc: "最长16字符", unit: "", scale: 1, access: 2, groupflag: 8, inputtype: "input" },
        //{ addr: 1040, name: "apn用户", desc: "最长16字符", unit: "", scale: 1, access: 2, groupflag: 8, inputtype: "input" },
        //{ addr: 1048, name: "apn密码", desc: "最长16字符", unit: "", scale: 1, access: 2, groupflag: 8, inputtype: "input" },
        //{ addr: 0x101f, name: "消音", desc: "0 disable 1 enable", unit: " ", scale: 1, access: 1},
        //{ addr: 0x1020, name: "复位", desc: "0 disable 1 enable", unit: "", scale: 1, access: 1 },
        //{ addr: 0x1021, name: "物联卡号", desc: "", unit: "", scale: 1, access: 2, groupflag: 15, inputtype: "text" },
      ], "210":[
        { addr: 1009, name: "电压报警阀值", desc: "230~300", unit: "V", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1010, name: "电流报警阀值", desc: "0~In", unit: "A", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1011, name: "漏电报警阀值", desc: "0~999", unit: "mA", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1012, name: "温度报警阀值", desc: "0~99", unit: "℃", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1013, name: "电压变比", desc: "0~999", unit: "倍", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1014, name: "电流变比", desc: "0~999", unit: "倍", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1015, name: "漏电变比", desc: "0~999", unit: "倍", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1016, name: "接入使能", desc: "1~4", unit: "", scale: 1, access: 3, groupflag: 1, inputtype: "bit", bits: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0], bitsdesc: ['T1', 'T2', 'T3', 'T4', 'UA', 'UB', 'UC', 'IA', 'IB', 'IC', 'IZ', 'A相电弧', 'B相电弧', 'C相电弧','禁止声音']},
        { addr: 1017, name: "继电器使能", desc: "0 disable 1 enable", unit: "", scale: 1, access: 3, groupflag: 1, inputtype: "switch" },
        //{ addr: 1018, name: "IP/域名", desc: "最长26个字符", unit: "", scale: 1, access: 2, groupflag: 13, inputtype: "input" },
        //{ addr: 1031, name: "端口", desc: "0~65535", unit: "", scale: 1, access: 2, groupflag: 1, inputtype: "input" },
        //{ addr: 1032, name: "apn", desc: "最长16字符", unit: "", scale: 1, access: 2, groupflag: 8, inputtype: "input" },
        //{ addr: 1040, name: "apn用户", desc: "最长16字符", unit: "", scale: 1, access: 2, groupflag: 8, inputtype: "input" },
        //{ addr: 1048, name: "apn密码", desc: "最长16字符", unit: "", scale: 1, access: 2, groupflag: 8, inputtype: "input" },
        //{ addr: 0x101f, name: "消音", desc: "0 disable 1 enable", unit: " ", scale: 1, access: 1},
        //{ addr: 0x1020, name: "复位", desc: "0 disable 1 enable", unit: "", scale: 1, access: 1 },
        //{ addr: 0x1021, name: "物联卡号", desc: "", unit: "", scale: 1, access: 2, groupflag: 15, inputtype: "text" },
      ],
      "230":[
        { addr: 1009, name: "电压报警阀值", desc: "230~300", unit: "V", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1010, name: "电流报警阀值", desc: "0~In", unit: "A", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1011, name: "漏电报警阀值", desc: "0~999", unit: "mA", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1012, name: "温度报警阀值", desc: "0~99", unit: "℃", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1013, name: "电压变比", desc: "0~999", unit: "倍", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1014, name: "电流变比", desc: "0~999", unit: "倍", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1015, name: "漏电变比", desc: "0~999", unit: "倍", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
        { addr: 1016, name: "接入使能", desc: "1~4", unit: "", scale: 1, access: 3, groupflag: 1, inputtype: "bit", bits: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0], bitsdesc: ['T1', 'T2', 'T3', 'T4', 'UA', 'UB', 'UC', 'IA', 'IB', 'IC', 'IZ', 'A相电弧', 'B相电弧', 'C相电弧','禁止声音']},
        { addr: 1017, name: "继电器使能", desc: "0 disable 1 enable", unit: "", scale: 1, access: 3, groupflag: 1, inputtype: "switch" },
        //{ addr: 1018, name: "IP/域名", desc: "最长26个字符", unit: "", scale: 1, access: 2, groupflag: 13, inputtype: "input" },
        //{ addr: 1031, name: "端口", desc: "0~65535", unit: "", scale: 1, access: 2, groupflag: 1, inputtype: "input" },
        //{ addr: 1032, name: "apn", desc: "最长16字符", unit: "", scale: 1, access: 2, groupflag: 8, inputtype: "input" },
        //{ addr: 1040, name: "apn用户", desc: "最长16字符", unit: "", scale: 1, access: 2, groupflag: 8, inputtype: "input" },
        //{ addr: 1048, name: "apn密码", desc: "最长16字符", unit: "", scale: 1, access: 2, groupflag: 8, inputtype: "input" },
        //{ addr: 0x101f, name: "消音", desc: "0 disable 1 enable", unit: " ", scale: 1, access: 1},
        //{ addr: 0x1020, name: "复位", desc: "0 disable 1 enable", unit: "", scale: 1, access: 1 },
        //{ addr: 0x1021, name: "物联卡号", desc: "", unit: "", scale: 1, access: 2, groupflag: 15, inputtype: "text" },
      ],
      "850":[

      ],
     "400":[
	{ addr: 1009, name: "浓度上限阀值", desc: "5~15", unit: "% obs/m", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
	],
     "500":[
	{ addr: 1009, name: "水压下限阀值", desc: "0.15~1.5", unit: "MPa", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
	],
     "600":[
	{ addr: 1009, name: "水位下限阀值", desc: "2~2.5", unit: "M", scale: 1, access: 3, groupflag: 1, inputtype: "input" },
	]
 }


var deviceOperations = {
      "8": [{ id: 1, name: '自检', icon: 'jianchafuwu', addr: 0x101e, datavalue: 1, op: 'w', visible: true, pwdRequire: false },
        { id: 2, name: '消音', icon: 'tishi', addr: 0x101f, datavalue: 1, op: 'w', visible: true,pwdRequire:false },
        { id: 3, name: '复位', icon: 'shuaxin', addr: 0x1020, datavalue: 1, op: 'w', visible: true, pwdRequire: false },
        { id: 4, name: '脱扣', icon: 'link', addr: 0x1018, datavalue: 1, op: 'w', visible: true, pwdRequire: true }
      ],
      "10": [//{ id: 1, name: '状态', icon: 'jianchafuwu', addr: '04000501', datavalue: 1, op: 'r', visible: true, pwdRequire: false },
        { id: 2, name: '分闸', icon: 'radar-o', addr: '06010101', datavalue: '0,2', op: 'w', visible: true, pwdRequire: true},
        { id: 3, name: '合闸', icon: 'power-o', addr: '06010201', datavalue: '0,2', op: 'w', visible: true, pwdRequire: true },
      ],
      "200": [
        //{ id: 0, name: '状态', icon: 'jianchafuwu', addr: 12, datavalue: 2, op: 'r', visible: true, pwdRequire: false },
        { id: 1, name: '复位', icon: 'shuaxin', addr: 3000, datavalue: 1, op: 'w', visible: true, pwdRequire: false},
        { id: 2, name: '合闸', icon: 'radar-o', addr: 3001, datavalue: 0, op: 'w', visible: true, pwdRequire: true},
        { id: 3, name: '脱扣', icon: 'power-o', addr: 3001, datavalue: 1, op: 'w', visible: true, pwdRequire: true},
        { id: 4, name: '消音', icon: 'tishi', addr: 3002, datavalue: 0, op: 'w', visible: true, pwdRequire: false },
      ],
            "210": [
        //{ id: 0, name: '状态', icon: 'jianchafuwu', addr: 12, datavalue: 2, op: 'r', visible: true, pwdRequire: false },
        { id: 1, name: '复位', icon: 'shuaxin', addr: 3000, datavalue: 1, op: 'w', visible: true, pwdRequire: false},
        { id: 2, name: '合闸', icon: 'radar-o', addr: 3001, datavalue: 0, op: 'w', visible: true, pwdRequire: true},
        { id: 3, name: '脱扣', icon: 'power-o', addr: 3001, datavalue: 1, op: 'w', visible: true, pwdRequire: true},
        { id: 4, name: '消音', icon: 'tishi', addr: 3002, datavalue: 0, op: 'w', visible: true, pwdRequire: false },
        { id: 5, name: '驱鼠', icon: 'radar-o', addr: 3002, datavalue: 3, op: 'w', visible: true, pwdRequire: false },
      ],
       "230": [
        //{ id: 0, name: '状态', icon: 'jianchafuwu', addr: 12, datavalue: 2, op: 'r', visible: true, pwdRequire: false },
        { id: 1, name: '复位', icon: 'shuaxin', addr: 3000, datavalue: 1, op: 'w', visible: true, pwdRequire: false},
        { id: 2, name: '分闸', icon: 'power-o', addr: 3001, datavalue: 1, op: 'w', visible: true, pwdRequire: true},
        { id: 3, name: '合闸', icon: 'radar-o', addr: 3001, datavalue: 0, op: 'w', visible: true, pwdRequire: true},
        { id: 4, name: '消音', icon: 'tishi', addr: 3002, datavalue: 0, op: 'w', visible: true, pwdRequire: false },
      ],
      "400":[
  	{ id: 1, name: '消音', icon: 'tishi', addr: 0x101f, datavalue: 1, op: 'w', visible: true,pwdRequire:false },
	],
	    "850":[
	                   { id: 1, name: '复位', icon: 'shuaxin', addr: 3000, datavalue: 1, op: 'w', visible: true, pwdRequire: false},
	    ],
      "500":[
  	//{ id: 1, name: '消音', icon: 'tishi', addr: 0x101f, datavalue: 1, op: 'w', visible: true,pwdRequire:false },
	],
      "600":[
  	//{ id: 1, name: '消音', icon: 'tishi', addr: 0x101f, datavalue: 1, op: 'w', visible: true,pwdRequire:false },
	]
    }

/*
var Registers=[

    { addr: 0x1012, name: "电压报警阀值", desc: "", unit: "V", scale: 1 },
    { addr: 0x1013, name: "电流报警阀值", desc: "0~65535", unit: "A", scale: 10 },
    { addr: 0x1014, name: "漏电报警阀值", desc: "0~65535", unit: "mA", scale: 1 },
    { addr: 0x1015, name: "温度报警阀值", desc: "0~65535", unit: "℃", scale: 1},
    { addr: 0x1016, name: "温度监测数量", desc: "1~4", unit: "", scale: 1},
    { addr: 0x1017, name: "脱扣使能", desc: "0 disable 1 enable", unit: "0 禁止 1 启用", scale: 1 },
    { addr: 0x1018, name: "强制脱扣", desc: "0 disable 1 enable", unit: "0 禁止 1 启用", scale: 1 },
    { addr: 0x1019, name: "IP1", desc: "0~255", unit: "xxx.xxx.xxx.xxx", scale: 1 },
    { addr: 0x101a, name: "IP2", desc: "0~255", unit: " ", scale: 1},
    { addr: 0x101b, name: "IP3", desc: "0~255", unit: " ", scale: 1},
    { addr: 0x101c, name: "IP4", desc: "0~255", unit: " ", scale: 1},
    { addr: 0x101d, name: "Port", desc: "0~65535", unit: " ", scale: 1},
    { addr: 0x1021, name: "物联网卡号", desc: "只读。长度不超过30位", unit: "", scale: 1},
    { addr: 0x101e, name: "自检", desc: "0 disable 1 enable", unit: " ", scale: 1 },
    { addr: 0x101f, name: "消音", desc: "0 disable 1 enable", unit: " ", scale: 1 },
    { addr: 0x1020, name: "复位", desc: "0 disable 1 enable", unit: "", scale: 1},
];
*/
